Ext.namespace("DeptPlan.Main2");

DeptPlan.Main2.tabIndex = {
	"search" : 0
};
DeptPlan.Main2.tabs = [];

DeptPlan.initUI = function() {
	var opentab = Utils.getParameter('opentab');
	if (!opentab) opentab = "search";	
	// init tabs
	DeptPlan.Main2.tabs.push(new DeptPlan.Search2());
	DeptPlan.instance = new Ext.TabPanel({
		region: 'center',
		activeTab: DeptPlan.Main2.tabIndex[opentab],
		items: DeptPlan.Main2.tabs
	});
	
	var mainview = new Ext.Viewport({
        layout:'border',
        items:[DeptPlan.instance]
    });
};

Ext.onReady(function(){
	Ext.QuickTips.init();
    Ext.BLANK_IMAGE_URL = '../resources/images/default/s.gif';
	DeptPlan.initUI();
});

